package com.example.testjsbridgedemo.view;

import android.app.Activity;
import android.content.Context;
import android.os.Build;
import android.util.AttributeSet;
import android.webkit.WebView;

import com.gzsll.jsbridge.WVJBWebView;

/**
 * 重新WVJBWebView
 */
public class VueWebView extends WVJBWebView {
    private Activity mActivity;//回调时用到
    private Context mContext;

    public VueWebView(Context context) {
        this(context, null);
    }

    public VueWebView(Context context, AttributeSet attrs) {
        this(context, attrs, android.R.attr.webViewStyle);
    }

    public VueWebView(Context context, AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);
        this.mContext = context;
        if (context instanceof Activity)
            mActivity = (Activity) context;

        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
            WebView.setWebContentsDebuggingEnabled(true);
        }
    }

    @Override
    public void loadUrl(String url) {
        super.loadUrl(url);
    }
}
